package com.hospital.utils;

import com.hospital.pojo.Doctor;
import org.apache.shiro.SecurityUtils;

/**
 * @Description
 * @Author he
 * @Data 2022/10/4 16:29
 */

public abstract class GlobalUserUtil {
    //获取用户名
    public static String getDoctor(){
        return ((Doctor)SecurityUtils.getSubject().getPrincipal()).getUserName();
    }
    public  static Long getDoctorId(){
        return ((Doctor)SecurityUtils.getSubject().getPrincipal()).getId();
    }
    public  static String getDoctorPerms(){
        return ((Doctor)SecurityUtils.getSubject().getPrincipal()).getPerms();
    }
}
